<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        .nav {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 70px;
            background-color: #e8e7e390;
            display: flex;
        }
        .nav ul{
            margin: 0 20px;
            /* overflow: hidden; */
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .nav li{
            list-style: none;
            float: left;
            padding: 0 10px;
            position: relative;
            /* display: flex;
            justify-content: center; */
        }
        .nav li a {
            text-decoration: none;
            text-align: center;
            line-height: 70px;
            color: #545151;
        }
        .nav ul span{
            
            float: left;
        }
        .nav li:hover{
            background-color: #3F3F3F;
        }
        .nav li:hover a{
            color: #E7D8D4;
        }
        .nav li:hover .tri{
            display: block;
        }
        .nav li:hover .content{
            display: block;
        }
        .tri{
            width: 0;
            height: 0;
            border-bottom: 10px solid skyblue;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            /* float: left; */
            margin-top: -10px;
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            display: none;
        }
        .nav .content{
            display: none;
            width: 100%;
            height: 50px;
            position: absolute;
            top: 70px;
            left: 0px;
            background-color: skyblue;
        }
        .nav .content span{
            display: block;
            width: 100%;
            line-height: 50px;
            color: #545151;
            text-align: center;
            font-size: 14px;
        }
    </style>
</head>



<body>
    <div class="nav">
        <ul>
            <li >
                <a href="">计算机网络</a>
                <div class="content">
                    <span>补药学这个</span>                   
                </div>
                <div class="tri"></div>
            </li>
            <span>|</span>
            <li>
                <a href="">数据结构与算法</a>
                <div></div>
            </li><span>|</span>
            <li>
                <a href="">操作系统</a>
                <div></div>
            </li><span>|</span>
            <li>
                <a href="">计算机组成原理</a>
                <div></div>
            </li><span>|</span>
            <li>
                <a href="">数据库系统</a>
                <div></div>
            </li>
        </ul>
    </div>
</body>

</html>